# Igor

Igor is Docker image for Laravel applications running on FrankenPHP web server

## Roadmap

### Base image

- [x] - FrankenPHP
  - [x] - Basic `php.ini` settings
  - [x] - Composer
  - [x] - NodeJS (npm, bun)
  - [x] - non-privileged user

### Local image

- [ ] - FrankenPHP
  - [ ] - XDebug
  - [x] - custom `php.ini` settings
  - [ ] - https
- [x] - MailPit
- [x] - MySQL
  - [ ] - Deal with migrations
- [x] - SQLite for testing purposes
- [x] - Redis
  - [x] - custom configuration
- [x] - Queues
- [x] - Cron
- [x] - Install Laravel on a first run
  - [ ] - Install required packages for dev development such as debugbar, ide helper, Pest, etc
  - [ ] - Use Sqlite in tests (change `phpunit.xml`)

### Prod image

- [x] - FrankenPHP
  - [x] - custom `php.ini` settings
  - [x] - https
  - [x] - custom Caddyfile
  - [x] - optimization (optimize cache, download FrankenPHP binary, remove `node_modules` after build)
  - [x] - resolve correct storage permissions
  - [x] - public storage symlink 
- [x] - MySQL
  - [ ] - Deal with migrations
- [x] - Redis
  - [x] - custom configuration
- [x] - Queues
- [x] - Cron
- [x] - Local volumes
- [ ] - Caddy load balancer
  - [x] - Caddyfile
  - [ ] - blue-green deploy

### Optional

- [ ] - PostgreSQL
  - [ ] - option to switch between databases
- [ ] - Typesense
- [ ] - Install Pest, configure test cases
- [ ] - Custom Caddyfile for localhost development (Do I need this?)
- [ ] - Websocket
- [ ] - Storage

### Common

- [x] - Define SERVER_NAME in production Caddyfile
- [x] - Do not repeat settings from `.env`
- [ ] - Gather all logs in one place with correct permissions

### Shell

- [ ] - Create `igor` executable
  - [ ] - build commands
  - [ ] - compose commands
  - [ ] - composer commands
  - [ ] - artisan commands
  - [ ] - tests
  - [ ] - npm commands
  - [ ] - bun commands
  - [ ] - mysql commands
  - [ ] - mysqldump commands
  - [x] - enter shell
  - [x] - enter shell as root
  - [ ] - redis commands
  - [ ] - copy certificate
